package com.yqjr.risk.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yqjr.risk.pojo.SysUser;
import com.yqjr.risk.service.ISysUserService;

@Controller
@RequestMapping("/sysuser")
public class SysUserController {
	@Resource
	private ISysUserService sysUserService;
	
	@RequestMapping("/showUser")
	public String toIndex(HttpServletRequest request,Model model){
		int userId = Integer.parseInt(request.getParameter("id"));
		SysUser user = this.sysUserService.getSysUserById(userId);
		model.addAttribute("user", user);
		System.out.println("test================================="+user.getChiName());
		return "showUser";
	}
}
